package models

import (
	//"gintest/database"
	"time"
)

//表结构
type OrderItem struct {
	Id        int    `json:"id" gorm:"column:id;primary_key" form:"id"`
	OrderId  int `json:"order_id" gorm:"column:order_id" form:"order_id"`
	ItemId  int `json:"item_id" gorm:"column:item_id" form:"item_id"`
	Title  string `json:"title" gorm:"column:title" form:"title"`
	Num  int `json:"num" gorm:"column:num" form:"num"`
	Money float64 `json:"money" gorm:"column:money" form:"money"`
	TotalMoney float64 `json:"total_money" gorm:"column:total_money" form:"total_money"`
	Image string `json:"image" gorm:"column:image" form:"image"`
	CreateAt time.Time  `json:"create_at" gorm:"column:create_at;type:datetime" time_format:"2006-01-02 15:04:05" form:"create_at"`
	UpdateAt time.Time  `json:"update_at" gorm:"column:update_at;type:datetime" time_format:"2006-01-02 15:04:05" form:"update_at"`
	DeleteAt time.Time  `json:"delete_at" gorm:"column:delete_at;type:datetime" time_format:"2006-01-02 15:04:05" form:"delete_at"`
}
func (OrderItem) TableName() string {
	return "order_item"
}